﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GoodDotNet.Core.Model
{
    /// <summary>
    /// 分页参数
    /// </summary>
    public class PagingPar
    {
        private int? pageIndex;
        private int? pageSize;
        /// <summary>
        /// 页码
        /// </summary>
        public int? PageIndex {
            get
            {
                if (pageIndex == null) return 1;
                return (int)pageIndex;
            }
            set {
                pageIndex = value==null?1:value;
            }
        }
        /// <summary>
        /// 页大小
        /// </summary>
        public int? PageSize {
            get
            {
                if (pageSize == null) return 10;
                return (int)pageSize;
            }
            set
            {
                pageSize = value==null?10:value;
            }
        }
    }
}
